package database;

import java.io.Serializable;
import java.sql.*;
public class BaseResourceRequest  implements Serializable { 
	/**
     * 
     */
    private static final long serialVersionUID = 2790963678159447275L;
	public static final String STATE  = "RESOURCEREQUEST.STATE"; 
	public static final String DEADLINE  = "RESOURCEREQUEST.DEADLINE"; 
	public static final String EMAIL  = "RESOURCEREQUEST.EMAIL"; 
	public static final String NICKNAME  = "RESOURCEREQUEST.NICKNAME"; 
	protected boolean saved  = false; 
	protected short disply  = 1; 
	protected Date time; 
	protected String resourcename; 
	protected int id; 
	protected String nickname  = "anonymous"; 
	protected String email; 
	protected Date deadline; 
	protected short state  = 0; 
	public static final String ID  = "RESOURCEREQUEST.ID"; 
	public static final String RESOURCENAME  = "RESOURCEREQUEST.RESOURCENAME"; 
	public static final String TIME  = "RESOURCEREQUEST.TIME"; 
	public static final String DISPLY  = "RESOURCEREQUEST.DISPLY"; 

	public void save()
	throws Exception{ 
		if(saved){
			BaseResourceRequestPeer.doUpdate(this);
		}else{
			BaseResourceRequestPeer.doInsert(this);
		}
	} 

	public short getDisply(){ 
		return disply;
	} 

	public Date getTime(){ 
		return time;
	} 

	public String getResourcename(){ 
		return resourcename;
	} 

	public void setNickname(String args0){ 
		nickname =args0;
	} 

	public void setEmail(String args0){ 
		email =args0;
	} 

	public void setDeadline(Date args0){ 
		deadline =args0;
	} 

	public void setState(short args0){ 
		state =args0;
	} 

	public short getState(){ 
		return state;
	} 

	public Date getDeadline(){ 
		return deadline;
	} 

	public String getEmail(){ 
		return email;
	} 

	public String getNickname(){ 
		return nickname;
	} 

	/**
	  * id is autogenerated 
	*/
	public int getId(){ 
		return id;
	} 

	public void setResourcename(String args0){ 
		resourcename =args0;
	} 

	public void setTime(Date args0){ 
		time =args0;
	} 

	public void setDisply(short args0){ 
		disply =args0;
	} 
}